<template>
  <Demo :msg="msg" school="尚硅谷" afanfan="小汤圆" @hello="showHelloMsg">
    <div>哈哈哈</div>

    <template v-slot:enen>
      <div>嗯嗯嗯</div>
    </template>

    <template v-slot:heihei>
      <div>嘿嘿嘿</div>
    </template>
  </Demo>
</template>

<script>
import { ref } from "vue"; // ref处理基本类型数据  reactive处理引用类型数据
import Demo from './components/demo.vue'
export default {
  name: 'App',
  components:{
    Demo
  },
  setup() {
    let msg = ref('hahah')
    function showHelloMsg(value) {
      alert(`你好啊,你触发了hello事件,我收到的参数是${value}`)
    }
    return {
      msg,
      showHelloMsg
    }
  }
}
</script>
